#include "newwindow.h"
#include "ui_newwindow.h"

newWindow::newWindow(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::newWindow)
{
    ui->setupUi(this);
    ui->text_received->setVisible(false);

    // // 将服务器发送过来的消息显示在文本框
    // void(MainWindow:: * mainWndSiganl)(QString) = &MainWindow::SendNewWndData;		//函数指针，限定作用域
    // void(newWindow:: * newwndSlot)(QString) = &newWindow::NewWndDsplyData;	//函数指针，限定作用域
    // QObject::connect(, mainWndSiganl, this, newwndSlot);
}

newWindow::~newWindow()
{
    delete ui;
}
void newWindow::NewWndDsplyData(QString data){
    ui->text_received->setPlainText(data);
    ui->text_received->setVisible(true);
}


